<!-- START thread -->
<div class="thread">
	<%- for comment in comments -%>
		<%- if comment.approved or logged_in? -%>
		  <%= render :partial => 'comments/single_comment', :object => comment -%>	  
		  <%- if comment.comments && comment.comments.size > 0 -%>
		  	<!-- cut off the recursion when we get too deep, but not if there's just one last measly comment left -->
		    <%- if depth >= ArchiveConfig.COMMENT_THREAD_MAX_DEPTH && comment.children_count > 1 -%>
		  	  <div class="comment"><p>(<%=h "%d more comments in this thread".t/comment.children_count -%>)</p></div>
		    <%- else -%>
			  <%= render :partial => 'comments/comment_thread', :locals => {:comments => comment.comments, :depth => depth+1 } -%>
		    <%- end -%>
		  <%- end -%>
		  <!-- a new comment would be added just before this placeholder by javascript -->	
		  <div class="new_comment_reply_placeholder_<%= comment.id -%>" style="display:none;"></div>
		<%- end -%>
	<%- end -%>
</div>
<!-- END thread --> 